﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:ui="clr-namespace:System.Windows.Documents;assembly=PresentationUI">

  <Style x:Key="SoftTeachDocumentViewer" TargetType="{x:Type DocumentViewer}">
    <Setter Property="Foreground"
                Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"/>
    <Setter Property="Background"
                Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
    <Setter Property="FocusVisualStyle"
                Value="{x:Null}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type DocumentViewer}">
          <Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Focusable="False">
            <Grid Background="{TemplateBinding Background}"
                          KeyboardNavigation.TabNavigation="Local">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
                <!--<RowDefinition Height="Auto"/>-->
              </Grid.RowDefinitions>
              <ContentControl Style="{DynamicResource {ComponentResourceKey TypeInTargetAssembly={x:Type ui:PresentationUIStyleResources},
                ResourceId=PUIDocumentViewerToolBarStyleKey}}"
                                      Grid.Row="0"
                                      Grid.Column="0"
                                      Focusable="{TemplateBinding Focusable}"
                                      TabIndex="0"/>
              <ScrollViewer Grid.Row="1"
                                    Grid.Column="0"
                                    CanContentScroll="true"
                                    HorizontalScrollBarVisibility="Auto"
                                    x:Name="PART_ContentHost"
                                    Focusable="{TemplateBinding Focusable}"
                                    IsTabStop="true"
                                    TabIndex="1"/>
              <DockPanel Grid.Row="1">
                <FrameworkElement DockPanel.Dock="Right"
                                  Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}"/>
                <Rectangle
                                   Visibility="Visible"
                                   VerticalAlignment="top"
                                   Height="10">
                  <Rectangle.Fill>
                    <LinearGradientBrush StartPoint="0,0"
                                                 EndPoint="0,1">
                      <GradientBrush.GradientStops>
                        <GradientStopCollection>
                          <GradientStop Color="#66000000"
                                                Offset="0"/>
                          <GradientStop Color="Transparent"
                                                Offset="1"/>
                        </GradientStopCollection>
                      </GradientBrush.GradientStops>
                    </LinearGradientBrush>
                  </Rectangle.Fill>
                </Rectangle>
              </DockPanel>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
</ResourceDictionary>